package com.mfl.calculator;

import java.math.BigDecimal;
/**
 * @Description: 苹果价格计算类
 * @Author: mfl
 * @Date:   2024-03-31
 */
public class AppleCalculator implements FruitCalculator {

    /**
     * 苹果价格计算，苹果8元
     * @param weight
     * @return
     */
    @Override
    public  Double totalPrice(int weight) {
        return new BigDecimal("8").multiply(new BigDecimal(String.valueOf(weight))).doubleValue();
    }
}
